package com.zhong.tree;

import java.io.Serializable;

/**
 * @author zhong
 * @version 1
 * @date 2022/04/09
 * @contact 1478168700@qq.com
 **/
public class TreeNode implements Serializable {

    private static final long serialVersionUID = -5148216283774212956L;


    private String data;
    private TreeNode left;
    private TreeNode right;

    public TreeNode(String data) {
        this.data = data;
    }

    public TreeNode() {
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public TreeNode getLeft() {
        return left;
    }

    public void setLeft(TreeNode left) {
        this.left = left;
    }

    public TreeNode getRight() {
        return right;
    }

    public void setRight(TreeNode right) {
        this.right = right;
    }

    @Override
    public String toString() {
        return "TreeNode{" +
                "data='" + data + '\'' +
                ", left=" + left +
                ", right=" + right +
                '}';
    }
}
